package com.yilin.medical.adapter;

import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.yilin.medical.R;
import com.yilin.medical.model.ShiPinHuiZhenBean;
import com.yilin.medical.model.ZhongLiuBean;
/**
 * 肿瘤adapter
 * @author lijianqun
 *
 */
public class ShiPinHuiZhenAdapter extends BaseAdapter {
	private Context context;
	private List<ShiPinHuiZhenBean> list;

	public ShiPinHuiZhenAdapter(Context context, List<ShiPinHuiZhenBean> list) {
		super();
		this.context = context;
		this.list = list;
	}

	@Override
	public int getCount() {
		return list.size();
	}

	@Override
	public Object getItem(int position) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		ViewHolder holder = null;
		if (convertView == null) {
			holder = new ViewHolder();
			convertView = View.inflate(context, R.layout.listitem_shipinhuizhen,
					null);
			holder.iv_pic = (ImageView) convertView.findViewById(R.id.iv_pic);
			holder.tv_title = (TextView) convertView
					.findViewById(R.id.tv_title);
			holder.tv_name1 = (TextView) convertView
					.findViewById(R.id.tv_name1);
			holder.tv_name2 = (TextView) convertView
					.findViewById(R.id.tv_name2);
			holder.tv_name3 = (TextView) convertView
					.findViewById(R.id.tv_name3);
			holder.tv_date = (TextView) convertView
					.findViewById(R.id.tv_date);
			holder.ll_item = (LinearLayout) convertView
					.findViewById(R.id.ll_item);
			convertView.setTag(holder);
		} else {
			holder = (ViewHolder) convertView.getTag();
		}
		return convertView;
	}

	class ViewHolder {
		ImageView iv_pic;
		TextView tv_title, tv_name1,tv_name2,tv_name3,tv_date;
		LinearLayout ll_item;

	}

}
